package com.teemo.dp.singleton.demo9;

import java.lang.reflect.Constructor;

/**
 * @author Teemo
 */
public class Demo2 {
    public static void main(String[] args) throws Exception{
        Washer2 instance = Washer2.getInstance();
        Washer2 instance2 = Washer2.getInstance();
        System.out.println(instance);
        System.out.println(instance2);
        Constructor<Washer2> declaredConstructor = Washer2.class.getDeclaredConstructor();
        declaredConstructor.setAccessible(true);
        Washer2 washer2 = declaredConstructor.newInstance();
        System.out.println(washer2);
    }
}
